-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
basic sparse handling #762
Conversation
Can this be closed in favour of JuliaDiff/ChainRules.jl#246? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of comments.
bors r+ Let's also add the corresponding changes in ChainRules, but I think we have some work looking to use sparse handling currently, and we can dd it to the list of things we have to move. |
bors r- Reviews 👍 |
Canceled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just needs a patch bump :)
That small difference would cause weird issues with |
@test gradtest(x -> sum(sparse(x)), rand(Float32, 3,3)) | ||
@test gradtest(x -> sum(sparse(x)), rand(Float32, 3)) # test vectors also | ||
@test gradcheck(x -> sum(diagm(x)), sparse(rand(3))) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can add a test for broadcasting
@@ -2,6 +2,8 @@ using Zygote, Test, Random, LinearAlgebra, Statistics, FillArrays, | |||
AbstractFFTs, FFTW, Distances | |||
using Zygote: gradient | |||
using Base.Broadcast: broadcast_shape | |||
using Distributed: pmap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this import?
a test is failing |
Actually, I see you also filed JuliaDiff/ChainRules.jl#246, can we close this PR in favor of that? |
Closing since this has been superseded by JuliaDiff/ChainRules.jl#579 |
Relates to #570, SciML/DifferentialEquations.jl#649, #742